package main

import (
	"fmt"
	"reflect"
)

type TagType struct {
	filed1 bool   "An important answer"
	filed2 string "The name of struct"
	filed3 int    "How much there are"
}

func refectTag(tt TagType, ix int) {
	ttType := reflect.TypeOf(tt)
	ixFiled := ttType.Field(ix)
	fmt.Printf("TagType filed: %v, Tag: %v\n", ixFiled.Name, ixFiled.Tag)
}

func main() {
	tt := TagType{true, "Baolan", 100}
	for i := 0; i < 3; i++ {
		refectTag(tt, i)
	}
}
